/*
 * @Author: cys
 * @Date: 2018-07-11 11:50:25
 * @Description 系统配置路由
 */
import _import from "./_import";
import { RouteConfig } from "vue-router/types";
import RouterView from "@/layouts/RouterView.vue";

const router: RouteConfig = {
  path: "archives", // 任务中心
  name: "archives",
  redirect: { name: "archivesPhoto" },
  component: RouterView,
  meta: {
    title: "电子档案"
  },
  children: [
    {
      path: "photo", // 图片
      name: "archivesPhoto",
      redirect: { name: "archivesPhotoIndex" },
      component: RouterView,
      meta: {
        title: "图片"
      },
      children: [
        {
          path: "index",
          name: "archivesPhotoIndex",
          component: _import("archives/photo"),
          meta: {
            title: "列表",
            keepAlive: true
          }
        }
      ]
    },

    {
      path: "video", // 视频
      name: "archivesVideo",
      redirect: { name: "archivesVideoIndex" },
      component: RouterView,
      meta: {
        title: "视频"
      },
      children: [
        {
          path: "index",
          name: "archivesVideoIndex",
          component: _import("archives/video"),
          meta: {
            title: "列表",
            keepAlive: true
          }
        }
      ]
    },

    {
      path: "other", // 其他
      name: "archivesOther",
      redirect: { name: "archivesOtherIndex" },
      component: RouterView,
      meta: {
        title: "其他"
      },
      children: [
        {
          path: "index",
          name: "archivesOtherIndex",
          component: _import("archives/other"),
          meta: {
            title: "列表",
            keepAlive: true
          }
        }
      ]
    }
  ]
};

export default router;
